/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author wyr
 */
@Embeddable
public class TPhonenosegPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "areaid")
    private int areaid;
    @Basic(optional = false)
    @Column(name = "carriertype")
    private int carriertype;
    @Basic(optional = false)
    @Column(name = "phonenoseg")
    private String phonenoseg;

    public TPhonenosegPK() {
    }

    public TPhonenosegPK(int areaid, int carriertype, String phonenoseg) {
        this.areaid = areaid;
        this.carriertype = carriertype;
        this.phonenoseg = phonenoseg;
    }

    public int getAreaid() {
        return areaid;
    }

    public void setAreaid(int areaid) {
        this.areaid = areaid;
    }

    public int getCarriertype() {
        return carriertype;
    }

    public void setCarriertype(int carriertype) {
        this.carriertype = carriertype;
    }

    public String getPhonenoseg() {
        return phonenoseg;
    }

    public void setPhonenoseg(String phonenoseg) {
        this.phonenoseg = phonenoseg;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) areaid;
        hash += (int) carriertype;
        hash += (phonenoseg != null ? phonenoseg.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TPhonenosegPK)) {
            return false;
        }
        TPhonenosegPK other = (TPhonenosegPK) object;
        if (this.areaid != other.areaid) {
            return false;
        }
        if (this.carriertype != other.carriertype) {
            return false;
        }
        if ((this.phonenoseg == null && other.phonenoseg != null) || (this.phonenoseg != null && !this.phonenoseg.equals(other.phonenoseg))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.TPhonenosegPK[areaid=" + areaid + ", carriertype=" + carriertype + ", phonenoseg=" + phonenoseg + "]";
    }

}
